﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ExtAspNet;

namespace HY.WEB.SA
{
    public partial class schedu_view : PageBase
    {
        public string us, whe = "", path = "",tab="sch_edu";    
       
        protected void Page_Load(object sender, EventArgs e)
        {
            us = Session["ID"].ToString();
            if (!IsPostBack)
            {
                if (!String.IsNullOrEmpty(Request["sid"]))
                {
                     hidsid.Text = Request["sid"].Trim();                
                }
             
                fill2();
            }

        
        }

        

        void fill2()
        {

           // BLL.SC.sch_edu S = new BLL.SC.sch_edu();
 
          DataTable d= BLL.Bllbase.get_table(tab,"sid="+hidsid.Text);//.Tables[0];
          hidsid.Text = d.Rows[0]["sid"].ToString().Trim();

          lblbh.Text = d.Rows[0]["ebh"].ToString().Trim();
          ddlschool.Text = d.Rows[0]["schname"].ToString().Trim();

          txtpro.Text = d.Rows[0]["spro"].ToString().Trim();

          txtm.Text = d.Rows[0]["mnum"].ToString().Trim();

          txtf.Text = d.Rows[0]["fnum"].ToString().Trim();
          snum.Text = d.Rows[0]["snum"].ToString().Trim();


          txtyear.Text = d.Rows[0]["fyear"].ToString().Trim();

          date1.Text =DateTime.Parse(d.Rows[0]["sdate"].ToString()).ToString("yyyy-MM-hh");
          date2.Text = DateTime.Parse(d.Rows[0]["edate"].ToString()).ToString("yyyy-MM-hh"); ;

          ddltype.Text = d.Rows[0]["stype"].ToString().Trim();

          lblsales.Text = d.Rows[0]["sales"].ToString().Trim();
          lbldtime.Text = d.Rows[0]["updtime"].ToString().Trim();

          lblmemo.Text = d.Rows[0]["memo"].ToString().Trim();

          }

       

    }
}